<?php
 if(isset($obj->access) && $obj->access['allow'] == true){ 
	 $access = $obj->access;?>
<div id="toolbar-box">
    <div class="toolbar" id="toolbar">
	<table class="toolbar">
            <tr>
             <?php if($access['allow_write'] == true){ ?>
				<td class="button" id="toolbar-new">
				<a  href="/admin/addalbom.html" class="toolbar">
				<span class="icon-32-new" title="New">
				</span>
				Створити
				</a>
				</td>
              <?php } ?>
            </tr>
       </table>
</div>
   <div class="clear"></div>
</div>
<div class="clear"></div>
	<div style="padding-left:20px;"><?php echo $obj->link; ?></div>
<div id="element-box">
			<div class="m">				
				<form action="" method="post" name="adminForm">
				<table class="adminlist">
					<thead>
						<tr>
							<th width="20px">#</th>
							<th class="title">Назва</th>
							<th class="title">Превью</th>
							<th width="5%">Ред.</th>
							<?php if($access['allow_delete'] == true){ ?>
							<th width="5%">Видалити</th>
							<?php } ?>
							<th width="1%" nowrap="nowrap">Пункт ID</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="12">
    <div class="pagination">
	<?php //echo $obj->pager['pager']; ?>
    </div>
				<div class="pagecounter"></div>
				<input type="hidden" name="limitstart" value="0" /></td>
						</tr>
					</tfoot>
					<tbody>
						<!-- CONTENT -->
						<?php $i=1; foreach($obj->images as $value){ ?>
						<tr class="row<?=$i?>" id='row<?=$value['id']?>'>
							<td><?=$i?></td>
							<td>
								<span class="editlinktip hasTip" title="<?=$value['desc']?>">
									<a href="/admin/images.html?id=<?=$value['id']?>"><?=$value['desc']?></a>
								</span>
                             <td nowrap="nowrap" align="center" width="150px">
								<img src="/public/upload/gallery/<?=$value['prev']?>" border="0" width="150px" />
							</td>
							<td>
								<a style='padding-left:5px;' href="/admin/setup.html?id=<?=$value['id']?>"><img src="/public/images/gear.png" border="0" width="16px" height="16px"></a>
							</td>
							<td>
								<span style='padding-left:5px;cursor:pointer;' id='del<?=$value['id']?>' onclick="actions(<?=$value['id']?>,'del_photo');"><img src="/public/images/admin/icons/error.png"  border="0" width="16px" height="16px"></span>
							</td>
							<td align="center"><?=$value['id']?></td>
						</tr>
						<?php $i++;} ?>
						<!-- END CONTENT -->
					</tbody>
					</table>
				</form>
				<div class="clear"></div>
			</div>
</div>
<div id="result"></div>
<?php }else{
echo"<div align='center'>
<img src='/public/images/admin/access_denied.png' border='0' width='256px' height='256px' /><br>
<span style='padding-left:10px;'><font size='5px' color='red'>
<stong>Доступ заборонено!</stong>
</font>
<br>
У вас недостатньо повноважень для доступу до розділів!
</span>
</div>";
} ?>
